/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.secretaria.saude.model;

import com.secretaria.saude.dominio.ProcedimentoTabWin;
import java.util.ArrayList;
import java.util.List;
import javax.swing.table.AbstractTableModel;

/**
 *
 * @author pablo
 */
public class ProcedimentoModel extends AbstractTableModel {
    
       
     String[] column = {"Procedimento do TabWin"};  
     List<ProcedimentoTabWin> data = new ArrayList<ProcedimentoTabWin>();     
       
     @Override  
     public int getColumnCount() {  
         return column.length;  
     }  
   
     @Override  
     public int getRowCount() {  
         return data.size();  
     }  
       
     public String getColumnName(int columnIndex) {  
         return column[columnIndex];  
     }  
   
     @Override  
     public Object getValueAt(int rowIndex, int columnIndex) {  
   
         ProcedimentoTabWin procedimentoTabWin = data.get(rowIndex);  
           
         if(columnIndex == 0)  
             return procedimentoTabWin.toString();
         else   
             return null;          
           
     }  
       
     public void addRow(ProcedimentoTabWin user) {  
         data.add( user );  
     }  
       
     public ProcedimentoTabWin getRow (int rowIndex) {  
         return data.get(rowIndex);  
     }  
       
    
}
